/* Copyright (c) [2025] [zhi1208@126.com]
 * SPDX-License-Identifier: MIT
 */

#pragma once

/*********************
 *      INCLUDES
 *********************/
#include <stdint.h>

#include "FreeRTOS.h"
#include "semphr.h"

/*********************
 *      DEFINES
 *********************/
#define WS2812_NUM_LEDS 60

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/
extern SemaphoreHandle_t ws2812_semaphore;

void bsp_ws2812_init();
void bsp_ws2812_set_hue(uint8_t index, uint16_t hue);
void bsp_ws2812_set_saturation(uint8_t index, uint8_t saturation);
void bsp_ws2812_set_brightness(uint8_t index, uint8_t brightness);
void bsp_ws2812_set_all_hue(uint16_t hue);
void bsp_ws2812_set_all_saturation(uint8_t saturation);
void bsp_ws2812_set_all_brightness(uint8_t brightness);
void bsp_ws2812_update();
void bsp_ws2812_clear();

/**********************
 *      MACROS
 **********************/